use diesel::{r2d2::{self, ConnectionManager, Pool}, MysqlConnection};

pub fn create_r2d2_mysql_conn_pool(database_url: &str) -> Pool<ConnectionManager<MysqlConnection>> {
    // connect to SQLite DB
    let manager = r2d2::ConnectionManager::<MysqlConnection>::new(database_url);
    r2d2::Pool::builder()
        .build(manager)
        .expect("database URL should be valid path to Mysql")
}
